package pro.ticktock.base.tree.impl;

import pro.ticktock.base.tree.api.Entry;

import java.util.Collection;
import java.util.function.Function;

/**
 * @author lambert
 * @created 18-9-30
 */
public interface TypedEntryTreeNode<T extends TypedEntryTreeNode<T, K, V>, K, V> extends TypedTreeNode<T, Entry<K, V>> {

  public K getEntryKey();

  public V getEntryValue();

  public Collection<T> getChildListBy(K key);

  public Collection<T> removeAllChildBy(K key);

  public void addChildBy(K key, V value, Function<Entry<K, V>, T> func);

  public void addChildBy(int idx, K key, V value, Function<Entry<K, V>, T> func);

  public void setValue(K key, V value);
}
